Skip to content

fix(cli): retire commands whose API operations no longer exist - #133

Open
polylane[bot] wants to merge 1 commit into
mainfrom
polylane/autofix/xwl8yhbxyvpr
Open

polylane[bot] wants to merge 1 commit into
mainfrom
polylane/autofix/xwl8yhbxyvpr

Conversation

@polylane

@polylane polylane Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Fixes: CLI typecheck fails: commands call operations the live API does not publish

The CLI's continuous integration fails at typecheck because fifteen commands call platform API operations that the published API document no longer contains: the workspace activity feed, daily notes, memory records, and natural-language service lookup. An agent that follows the shipped skill gets a not-found response from those commands. After this merges the CLI compiles against the API contract it is gated on.

flowchart TD
  A["Live OpenAPI document: 253 paths, 310 operations"] --> B["npm run codegen in CI"]
  B --> C["src/generated/client.ts"]
  D["feed, note, memory and service-find commands<br/>(observed: call removed operations)"] --> C
  C --> E["tsc --noEmit in the Typecheck step"]
  E -->|"21 errors observed"| F["CI red on main"]
  G["this change retires those commands"] -.->|"proposed"| D
Loading

Why this fix

The live API document and the API repository's own guarded document builder both report the same 253 paths, and neither defines the operations these commands call, so every one of them could only fail at runtime. Regenerating the client from that document and typechecking reproduces the twenty-one errors on main, and the same commands pass after removing them. One question stays open: the CLI's readme and agent skill still advertised the retired commands, so if the platform means to keep workspace feed, daily notes or natural-language service lookup, the API has to publish those operations. The investigation holds the exact times and payloads.

Fix walkthrough

Watch the fix walkthrough

Watch the fix explained (3:05). Recorded for commit 3b0464bc9235ea2c8388f0857a6cef01bb957d8b.

Causal chain
  • Signal (alert): GitHub Actions workflow "CI" run #363 (attempt 1) concluded failure on main at 0f133f4
  • Surfacing site: coreplanelabs/cli at .github/workflows/checks.yml#Typecheck (npm run typecheck)
  • Mechanism: codegen builds src/generated/client.ts from the live document at https://api.polylane.com/v1/doc (253 paths, 310 operations). That document does not publish feed.list, feed.summary, memories.{get,list,post,del,search}, notes.* or cloud_infra.nodes.search, so the 15 command files that call those operations produce 21 tsc errors and the Typecheck step fails.
  • Producer: polylane CLI command surface, at coreplanelabs/cli:src/commands/feed, src/commands/memory, src/commands/note, src/commands/service/find.ts
  • Trigger: The API stopped publishing workspace feed, daily notes, memory CRUD and natural-language node search; the CLI consumes that document at CI time.
  • What happens to the failed unit today: The CLI gates releases on typecheck against the live prod OpenAPI document (cut-release workflow). commands.md: every command's operationId must resolve to a generated client method.
  • Blast radius: unknown other resource(s), unknown other tenant(s); data at risk: none named
  • Producer evidence:
    • npx tsc --noEmit on main: 21 errors, all TS2339/TS2551 on generated-client methods plus cascaded implicit-any
    • Live spec https://api.polylane.com/v1/doc parsed by npm run codegen: 253 paths, 310 operations, none of the 15 declared operation ids present
    • coreplanelabs/nominal scripts/generate-api-client prints 'Wrote the merged OpenAPI document (253 paths)', matching the live document, and the API source defines none of the retired operations
    • GET/POST /v1/feed*, /v1/notes* return the gateway 404; /v1/memories returns a plain 404
32 files changed (+50/-762)
  • ERRORS.md: modified, +1/-1
  • README.md: modified, +0/-1
  • skill/SKILL.md: modified, +5/-8
  • src/commands/feed/index.ts: removed, +0/-4
  • src/commands/feed/list.ts: removed, +0/-145
  • src/commands/feed/summary.ts: removed, +0/-46
  • src/commands/index.ts: modified, +0/-6
  • src/commands/memory/delete.ts: removed, +0/-34
  • src/commands/memory/find.ts: removed, +0/-39
  • src/commands/memory/index.ts: removed, +0/-13
  • src/commands/memory/list.ts: removed, +0/-53
  • src/commands/memory/save.ts: removed, +0/-48
  • src/commands/memory/show.ts: removed, +0/-19
  • src/commands/note/delete.ts: removed, +0/-34
  • src/commands/note/global-clear.ts: removed, +0/-32
  • src/commands/note/global-set.ts: removed, +0/-21
  • src/commands/note/global-show.ts: removed, +0/-17
  • src/commands/note/index.ts: removed, +0/-17
  • src/commands/note/list.ts: removed, +0/-49
  • src/commands/note/save.ts: removed, +0/-44
  • …and 12 more files

View thread View autofix


Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.

Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
@polylane polylane Bot added polylane severity:medium Polylane autofix severity: medium labels Oct 15, 2026
@polylane
polylane Bot requested a review from boristane October 15, 2026 15:43
@polylane

polylane Bot commented Oct 15, 2026

Copy link
Copy Markdown
Author

Warning

Polylane could not verify the production impact of this pull request.

Retired feed, memory, note and service-find commands call API operations the live document no longer publishes, so they could not typecheck. The checkout shows all resolveServiceId callers updated and no broken imports; no workspace cloud resource runs this CLI.

Evidence read: src/commands/service/id.ts at head returns a full-id parse and throws CLIError otherwise; its four callers (graph.ts, logs.ts, metrics.ts, show.ts) all use the sync signature. No workspace cloud resource executes this CLI (no matching graph node), and no relevant production series exists to forecast, so no chart is attached.

View the full analysis →

Also considered · 3 refuted
  • Refuted · Retiring feed, memory, note and service-find commands removes still-working CLI functionality · The investigation's spec parse finds none of the operationIds in the live document and the endpoints return 404; with typecheck red, no release carrying these commands shipped.
  • Refuted · Dropping the natural-language fallback in resolveServiceId breaks the remaining service commands · The fallback called the same cloud_infra.nodes.search operation the document no longer publishes, so it could not run in any build that typechecks.
  • Refuted · thread ask stops labelling mem_ context ids as memory · With the memories API retired, no mem_ id exists to pass; nothing in the workspace supplies one, so the removed branch is unreachable.
Analysed against 9 cloud accounts and 1 repository
  • Cloud accounts: coreplane-prod, baseberry-uat, coreplane-infra, coreplane, coreplane-gtm, 251714435813, Polylane, coreplanelabs, nominal-493716
  • Repository: coreplanelabs/cli

View in Polylane Disable reviews

Polylane could not find the cloud resources this repository manages, so this review looked at the entire cloud account. Connect this repository to its resources and the next review will focus on exactly what this code deploys to.

Connect resources

Polylane analysed 3b0464b for production impact. You can ask follow-ups by mentioning @polylane in a comment.

Rate this review: 👍 helpful · 👎 not helpful · 😕 confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

polylane severity:medium Polylane autofix severity: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant